package cn.doitedu.udfs;

import org.apache.flink.table.functions.ScalarFunction;
import ch.hsr.geohash.GeoHash;

public class GeoHashUDF extends ScalarFunction {

    public String eval(Double lat,Double lng){
        String geohash = null;
        try {
            geohash = GeoHash.geoHashStringWithCharacterPrecision(lat, lng, 6);
        }catch (Exception e){

        }
        return geohash;
    }
}
